package com.jt.flight.controller;

import com.jt.flight.domain.Kv;
import org.nutz.dao.Cnd;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * since 2015/11/25.
 */
@RestController
@RequestMapping("/afare")
public class AfareController extends BaseController {


    @RequestMapping("/search")
    public Object search() {
        Kv s = dao.fetch(Kv.class, Cnd.where("jkey", "=", "search"));
        return s.getJvalue();
    }

    @RequestMapping("/booking")
    public Object booking() {
        Kv s = dao.fetch(Kv.class, Cnd.where("jkey", "=", "booking"));
        return s.getJvalue();
    }

    @RequestMapping("/order")
    public Object order() {
        Kv s = dao.fetch(Kv.class, Cnd.where("jkey", "=", "order"));
        return s.getJvalue();
    }

    @RequestMapping("/payValidate")
    public Object payValidate() {
        Kv s = dao.fetch(Kv.class, Cnd.where("jkey", "=", "payValidate"));
        return s.getJvalue();
    }

}
